package com.anjubao.parking.municipal.parkinglot.service;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotSlotFailureDto;
import com.anjubao.parking.municipal.parkinglot.mapper.ParkingLotDeviceFailureMapper;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotDeviceFailure;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 设备故障表service
 * @author anjubao
 */
@Service
public class ParkingLotDeviceFailureService extends ServiceImpl<ParkingLotDeviceFailureMapper, ParkingLotDeviceFailure> {

    @Autowired
    private ParkingLotDeviceFailureMapper parkingLotDeviceFailureMapper;

    /**
     * 根据泊位code获取设备状态
     * @param code
     * @return
     */
    public List<ParkingLotSlotFailureDto> getStatusFromFailure(String code) {
        return parkingLotDeviceFailureMapper.getStatusFromFailure(code);
    }
}
